﻿@model IEnumerable<Vizzio.Models.Socio>

@{
    ViewBag.Title = "Busqueda de socio";
}

<h2>Busqueda de Socio</h2>

<form class="form-inline" method="post" action="/Socio/Buscar" role="form">
    <div class="form-group">
        <label class="sr-only" for="CI">Ci</label>
        <input type="text" class="form-control" id="CI" maxlength="10" name="CI" placeholder="Ingrese CI">
    </div>
    <div class="form-group">
        <label class="sr-only" for="Nombre">Nombre</label>
        <input type="text" class="form-control" id="Nombre" maxlength="20" name="Nombre" placeholder="Nombre de Socio">
    </div>
    <div class="form-group">
        <label class="sr-only" for="Apellidos">Apellidos</label>
        <input type="text" class="form-control" id="Apellidos" maxlength="30" name="Apellidos" placeholder="Apellidos del Socio">
    </div>
    <button type="submit" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-search"></span> Buscar</button>
</form>
<p>
    @Html.ActionLink("Registrar Socio", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CI)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Apellidos)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Telefono)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Celular)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.CI)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Apellidos)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Celular)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new { id=item.SocioID }) |
           @* @Html.ActionLink("Detalle", "Details", new { id=item.SocioID }) |*@
            @Html.ActionLink("Eliminar", "Delete", new { id=item.SocioID }) |
            @Html.ActionLink("Clientes", "Index","Cliente", new { id = item.SocioID },null)

        </td>
    </tr>
}

</table>
